package com.hysf.controller;

import com.hysf.entity.Buy;
import com.hysf.service.BuyService;
import com.hysf.service.impl.BuyServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class BuyController extends Base{
    BuyService service =new BuyServiceImpl();

    /**
     *
     * @Description:
     *
     * @Author: 石涛
     * @Date: 2024/4/9 10:51
     **/
    protected void findAll(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        List<Buy> BuyAll = service.findAll();
        req.setAttribute("BuyAll",BuyAll);

        req.getRequestDispatcher("/buy.jsp").forward(req,resp);
    }
}
